import string
import hashlib
import random
import uuid


def rand_str(num=16):
    randStr = "".join(random.sample(list(string.digits) + list(string.ascii_letters), num))
    # 生成 md5
    # randHash = hashlib.md5(randStr.encode("utf-8")).hexdigest()
    return randStr

def rand_file():
     # 生成一个随机字符串
    uuid_str = uuid.uuid4().hex
    return uuid_str